/**
 * Copyright © 2018 金风科技. All rights reserved.
 *
 * @Title: SystemConsts.java
 * @Prject: tgcw-c-common
 * @Package: com.goldwind.common.consts
 * @Description: 系统基础业务常量
 * @author: liangwenlu
 * @date: 2019年3月25日 下午2:50:24
 * @version: V1.0
 */
package com.gd.iot.energy.consts;


import org.springframework.stereotype.Component;

import java.io.File;

/**
 * @ClassName: SystemConsts
 * @Description: 系统基础业务常量
 */
@Component
public class SystemConsts {

    /**
     * 成功返回值
     */
    public static final String SUCCESS_MSG = "成功";

    /**
     * header token 的名称
     */
    public static final String TOKEN_KEY = "Authorization";

    /**
     * 数据模型gc文件后缀
     */
    public static final String CONFIG_SUFFIX = ".gc";

    /**
     * 超管
     */
    public static final String SUPER_ADMIN_NAME = "超级管理员";

    /**
     * 默认分页第一页
     */
    public static final Integer PAGE_NUM = 1;

    /**
     * 默认分页大小10个
     */
    public static final Integer PAGE_SIZE = 10;

    /**
     * 开始时间后缀
     */
    public static final String START_TIME = " 00:00:00";

    /**
     * 结束时间后缀
     */
    public static final String END_TIME = " 23:59:59";

    /**
     * 集合类默认初始化大小
     */
    public static final Integer MAP_DEFAULT_SIZE = 16;

    /**
     * 默认List初始化大小
     */
    public static final Integer LIST_DEFAULT_SIZE = 16;


    /**
     * 国际化配置，前端传参标示
     */
    public static final String I18N_REMARK = "I18N";

    /**
     * 加密串
     */
    public static final String PASSWORD_SECRET = "d49ffc76793f660d841c25b8b51ad654cb4b2ecd";

    /**
     * 工单管理系统 SSO加密串
     */
    public static final String WORK_ORDER_SSO_SECRET = "goldwind";

    /**
     * UTF8编码
     */
    public static final String UTF_8 = "UTF-8";

    /**
     * GBK编码
     */
    public static final String GBK = "GBK";

    /**
     * 用户名或密码错误
     */
    public static final Integer LOGIN_FAIL = 401;

    /**
     * 没有权限
     */
    public static final Integer NO_AUTHORIZATION = 403;
    /**
     * 百分号
     */
    public static final String PERCENT = "%";
    /**
     * 逗号
     */
    public static final String COMMA = ",";

    /**
     * 配置文件路径
     */
    public static final String CONFIG_DIR = "config/";

    /**
     * jar包所在路径
     */
    public static final String ROOT_DIR = System.getProperty("user.dir");

    /**
     * 临时目录
     */
    public static final String TEMP_FILE_PATH = ROOT_DIR + "/tmpfile/";

    /**
     * static路径
     */
    public static final String STATIC_DIR = ROOT_DIR + File.separator + "static" + File.separator;

    /**
     * 上传文件uri
     */
    public static final String FILE_UPLOAD_URI = "file/upload";

    /**
     * 下载文件uri
     */
    public static final String FILE_DOWNLOAD_URI = "file/download";

    /**
     * soam TOKEN过期时间
     */
    public static final long TOKEN_EXPIRE_TIME_IN_MILLS = 600000;

    /**
     * 0.00元
     */
    public static final String ZERO_2 = "0.00";

    /**
     * excel后缀
     */
    public static final String EXCEL_SUFFIX = ".xlsx";

    private SystemConsts() {

    }



    /*-------------------------------------------删除标志位-------------------------------------------*/

    /**
     * @ClassName: DeleteFlag
     * @Description: 删除标志位
     */
    public enum DeleteFlag {
        /**
         * 是否删除标志
         */
        INVALID("1", "已删除"), VALID("0", "正常");
        public final String value;
        public final String valueName;

        DeleteFlag(String value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * @ClassName: HttpMethodEnum
     * @Description: HTTP请求方式
     */
    public enum HttpMethodEnum {
        /**
         * 请求类型
         */
        POST("POST", "post请求"), GET("GET", "get请求"), PUT("PUT", "put请求"), OPTIONS("OPTIONS", "options请求");
        public final String value;
        public final String valueName;

        HttpMethodEnum(String value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * @ClassName: TokenState
     * @Description: token状态
     */
    public enum TokenState {
        /**
         * token状态
         */
        EXPIRED("EXPIRED", "过期"), INVALID("INVALID", "无效"), VALID("VALID", "有效"), EXPIRATION("EXPIRATION", "更新状态");
        public final String value;
        public final String valueName;

        TokenState(String value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * http请求状态码
     */
    public enum HTTP_CODE {
        /**
         * 请求结果
         */
        SC_OK(200, "请求成功"),
        SC_CREATED(201, "请求已经被实现"),
        BAD_REQUEST(400, "错误的请求"),
        UNAUTHORIZED(401, "未授权的"),
        FORBIDDEN(403, "禁止访问"),
        NOT_FOUND(404, "页面不存在"),
        METHOD_NOT_ALLOWED(405, "请求方式不被允许"),
        SERVER_ERROR(500, "服务器错误"),
        SERVICE_UNAVAILABLE(503, "服务不可达");
        private Integer value;
        private String valueName;

        HTTP_CODE(Integer value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public Integer getValue() {
            return value;
        }

        public String getValueName() {
            return valueName;
        }
    }

    /**
     * @ClassName: BooleanEnum
     * @Description: 通用布尔型枚举
     */
    public enum BooleanEnum {
        /**
         * 布尔值
         */
        TRUE(true, "是"), FALSE(false, "否");
        public final Boolean value;
        public final String valueName;

        BooleanEnum(Boolean value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getNameByValue(boolean value) {
            for (BooleanEnum booleanEnum : BooleanEnum.values()) {
                if (booleanEnum.value.equals(value)) {
                    return booleanEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * @ClassName: BooleanEnum
     * @Description: 是否
     */
    public enum YesOrNoEnum {
        /**
         * 布尔值
         */
        NO(0, "否"), YES(1, "是");
        public final Integer value;
        public final String valueName;

        YesOrNoEnum(Integer value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getNameByValue(int value) {
            for (YesOrNoEnum yesOrNoEnum : YesOrNoEnum.values()) {
                if (yesOrNoEnum.value.equals(value)) {
                    return yesOrNoEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * @ClassName: BooleanEnum
     * @Description: 通用布尔型枚举
     */
    public enum StatusEnum {
        /**
         * 布尔值
         */
        TRUE(true, "正常"), FALSE(false, "禁用");
        public final Boolean value;
        public final String valueName;

        StatusEnum(Boolean value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getNameByValue(boolean value) {
            for (StatusEnum statusEnum : StatusEnum.values()) {
                if (statusEnum.value.equals(value)) {
                    return statusEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * @ClassName: LanguageEnum
     * @Description: 多语言
     */
    public enum LanguageEnum {
        /**
         * 多语言
         */
        ZH_CN("zh_CN", "简体中文"), EN_US("en_US", "英文(美国)");
        public final String value;
        public final String valueName;

        LanguageEnum(String value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * @ClassName: LanguageEnum
     * @Description: 多语言
     */
    public enum OrderType {
        /**
         * 多语言
         */
        ASC("asc", "正序"), DESC("desc", "倒叙");
        public final String value;
        public final String valueName;

        OrderType(String value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * @ClassName: EnergyTypeEnum
     * @Description: 电表类型
     */
    public enum EnergyTypeEnum {
        /**
         * 多语言
         */
        WATER(0, "水表");
        public final Integer value;
        public final String valueName;

        EnergyTypeEnum(Integer value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getNameByValue(Integer value) {
            for (EnergyTypeEnum energyTypeEnum : EnergyTypeEnum.values()) {
                if (energyTypeEnum.value.equals(value)) {
                    return energyTypeEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * @ClassName: PermissionEnum
     * @Description: 权限类型
     */
    public enum PermissionEnum {
        /**
         * 布尔值
         */
        CATALOG(0, "目录"),
        MENU(1, "菜单"),
        BUTTON(2, "按钮");
        public final Integer value;
        public final String valueName;

        PermissionEnum(Integer value, String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getNameByValue(Integer value) {
            for (PermissionEnum permissionEnum : PermissionEnum.values()) {
                if (permissionEnum.value.equals(value)) {
                    return permissionEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 前缀
     */
    public enum Prefix {
        /**
         * 前缀
         */
        AREA("AREA", 0),
        CJQ("CJQ", 1),
        JZQ("JZQ", 2),
        USER("USER", 3),
        EQ("EQ", 4),
        ZC("ZC", 5),
        SJBH("SJBH", 6),
        GYS("GYS", 7),
        BIGAREA("BIGAREA", 8),
        BIGZC("BIGZC", 9),
        MMD("MMD", 10),
        HHN("HHN", 11);

        public final String code;
        public final Integer value;


        Prefix(final String code, final int value) {
            this.code = code;
            this.value = value;
        }
    }

    /**
     * 缴费方式
     */
    public enum OperatingfeeSettlementTypeEnum {
        /**
         * 缴费方式
         */
        AUTO("AUTO", 0),
        MANUAL("MANUAL", 1),
        NEW("NEW", 2),
        SPLIT("SPLIT", 3),
        LADDRPOOR("LADDRPOOR", 4),
        LADDRPOS("LADDRPOS", 5);

        public final Integer value;
        public final String valueName;

        OperatingfeeSettlementTypeEnum(final String valueName, final int value) {
            this.valueName = valueName;
            this.value = value;
        }
    }

    /**
     * 支付方式
     */
    public enum OperatingfeePaywayEnum {
        /**
         * 支付方式
         */
        CASH("CASH", 0, "现金"),
        WEIXIN("WEIXIN", 1, "微信"),
        ALIPAY("ALIPAY", 2, "支付宝"),
        SYSTEM("SYSTEM", 3, "系统");

        public final String code;
        public final Integer value;
        public final String valueName;


        OperatingfeePaywayEnum(final String code, final int value, final String valueName) {
            this.code = code;
            this.value = value;
            this.valueName = valueName;
        }

        public static String getNameByValue(Integer value) {
            for (OperatingfeePaywayEnum operatingfeePaywayEnum : OperatingfeePaywayEnum.values()) {
                if (operatingfeePaywayEnum.value.equals(value)) {
                    return operatingfeePaywayEnum.valueName;
                }
            }
            return null;
        }

    }

    /**
     * 支付渠道
     */
    public enum OperatingfeePaychannelEnum {
        /**
         * 支付渠道
         */
        WUYE("WUYE", 0, "物业"),
        APP("APP", 1, "移动终端"),
        PLATFORM("PLATFORM", 2, "费用核算");

        public final String code;
        public final Integer value;
        public final String valueName;


        OperatingfeePaychannelEnum(final String code, final int value, final String valueName) {
            this.code = code;
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 收费类型
     */
    public enum ChargeType {
        /**
         * 收费类型
         */
        pay("缴费", 0),
        refund("退费", 1),
        OWE("欠费", 2),
        recharge("充值", 3);

        public final String code;
        public final Integer value;


        ChargeType(final String code, final int value) {
            this.code = code;
            this.value = value;
        }

        public static ChargeType getEnumByValue(int value) {
            for (ChargeType chargeType : ChargeType.values()) {
                if (chargeType.value.equals(value)) {
                    return chargeType;
                }
            }
            return null;
        }
    }

    /**
     * 支付来源
     */
    public enum PayFrom {
        /**
         * 支付来源
         */
        ADMIN_RECHARGE("管理员充值", 0),
        INTERFACE_RECHARGE("接口充值", 1),
        IVR_RECHARGE("IVR流程充值", 2);

        public final Integer value;
        public final String valueName;


        PayFrom(final String valueName, final int value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 支付状态
     */
    public enum PayState {
        /**
         * 支付状态
         */
        FAILED("失败", 0),
        SUCCESS("成功", 1),
        ERROR("异常", 2);

        public final Integer value;
        public final String valueName;


        PayState(final String valueName, final int value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 支付类型
     */
    public enum PayType {
        /**
         * 支付类型
         */
        RECHARGE("充值", 0),
        CHARGE("扣款", 1),
        CREATE_ACCOUNT("开户", 2),
        ILLEAGLE_OPERATION("非法操作", 3),
        ERROR("ERROR", 4);

        public final Integer value;
        public final String valueName;


        PayType(final String valueName, final int value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 支付方式
     */
    public enum PayWay {

        /**
         * 支付方式
         */
        CASH("现金", 0),
        PHONE_CARD("电话卡", 1),
        RENT_MONEY("租金", 2),
        CHECK("支票", 3),
        CREDIT_CARD("信用卡", 4),
        OTHER("其他", 5);

        public final Integer value;
        public final String valueName;


        PayWay(final String valueName, final int value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 查询类型
     */
    public enum QueryFeeType {
        /**
         * 查询类型
         */
        COMMON("通用", 0),
        BALANCE_QUERY("余额查询", 1),
        ARREARS_QUERY("欠费查询", 2);
        public final Integer value;
        public final String valueName;


        QueryFeeType(final String valueName, final int value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 日期周期类型类型
     */
    public enum DATE_CYCLE_TYPE {
        /**
         * 日期周期类型类型
         */
        DAY("日", "0"),
        MONTH("月", "1"),
        QUARTER("季", "2"),
        YEAR("年", "3");
        public final String value;
        public final String valueName;


        DATE_CYCLE_TYPE(final String valueName, final String value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static DATE_CYCLE_TYPE getEnumByValue(String value) {
            for (DATE_CYCLE_TYPE dateCycleType : DATE_CYCLE_TYPE.values()) {
                if (dateCycleType.value.equals(value)) {
                    return dateCycleType;
                }
            }
            return null;
        }
    }

    /**
     * 季度
     */
    public enum QUARTER_TYPE {
        /**
         * 季度
         */
        FIRST("第一季度", "0"),
        SECOND("第二季度", "1"),
        THIRD("第三季度", "2"),
        FORTH("第四季度", "3");
        public final String value;
        public final String valueName;

        QUARTER_TYPE(final String valueName, final String value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 是否开票
     */
    public enum InvoiceStatus {
        /**
         * 季度
         */
        NO("未开票", 0),
        YES("已开票", 1);
        public final Integer value;
        public final String valueName;

        InvoiceStatus(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (InvoiceStatus invoiceStatus : InvoiceStatus.values()) {
                if (invoiceStatus.value.equals(value)) {
                    return invoiceStatus.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 表类型
     */
    public enum EquipType {
        NB("NB", 0),
        LORA("LORA", 1),
        FAMILY("FAMILY", 2);
        public final Integer value;
        public final String valueName;

        EquipType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipType equipType : EquipType.values()) {
                if (equipType.value.equals(value)) {
                    return equipType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 指令列表的设备类型
     */
    public enum EquipmentTypeEnum {
        GENERAL("GENERAL", 0),
        LORAWAN("LORAWAN", 1),
        NBIOT("NBIOT", 2),
        RTU("RTU", 3);
        public final Integer value;
        public final String valueName;

        EquipmentTypeEnum(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipmentTypeEnum equipType : EquipmentTypeEnum.values()) {
                if (equipType.value.equals(value)) {
                    return equipType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 指令执行状态
     */
    public enum InstructionStateEnum {
        WAIT(0, "等待执行"),
        DOIONG(1, "执行中"),
        SUCCESS(2, "执行成功"),
        FAIL(3, "执行失败");
        public final Integer value;
        public final String valueName;

        InstructionStateEnum(final Integer value, final String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (InstructionStateEnum instructionStateEnum : InstructionStateEnum.values()) {
                if (instructionStateEnum.value.equals(value)) {
                    return instructionStateEnum.valueName;
                }
            }
            return null;
        }

        public static String getProgressByValue(Integer value) {
            if (InstructionStateEnum.WAIT.value.equals(value)) {
                return "0%";
            } else if (InstructionStateEnum.DOIONG.value.equals(value)) {
                return "50%";
            } else if (InstructionStateEnum.SUCCESS.value.equals(value)) {
                return "100%";
            } else {
                return "100%";
            }
        }
    }

    /**
     * 阀状态
     */
    public enum ValveType {
        /**
         * 阀状态
         */
        CLOSE("关闭", 0),
        OPEN("开启", 1),
        UNKNOWN("未知", 2);
        public final Integer value;
        public final String valueName;

        ValveType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (ValveType valveType : ValveType.values()) {
                if (valveType.value.equals(value)) {
                    return valveType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 客户类型
     */
    public enum CustomerTypeEnum {
        /**
         * 客户类型
         */
        RESIDENTS(0, "居民 使用"),
        BUSINESS(1, "商业 使用"),
        INDUSTRIAL(2, "工业 使用"),
        AGRICULTURAL(3, "农业 使用"),
        EDUCATION(4, "教育 使用"),
        MEDICAL(5, "医疗 使用"),
        GOANDINS(6, "政府及事业单位 使用"),
        OTHER(7, "其他 使用");
        public final Integer value;
        public final String valueName;

        CustomerTypeEnum(final Integer value, final String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (CustomerTypeEnum customerTypeEnum : CustomerTypeEnum.values()) {
                if (customerTypeEnum.value.equals(value)) {
                    return customerTypeEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 统计类型
     */
    public enum StatisticsType {
        /**
         * 统计类型
         */
        YEAR_TO_YEAR("同比", 0),
        MONTH_TO_MONTH("环比", 1);
        public final Integer value;
        public final String valueName;

        StatisticsType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 增减类型
     */
    public enum DifferenceType {
        /**
         * 增减类型
         */
        GTE(">=", "0"),
        LTE("<=", "1");
        public final String value;
        public final String valueName;

        DifferenceType(final String valueName, final String value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(String value) {
            for (DifferenceType differenceType : DifferenceType.values()) {
                if (differenceType.value.equals(value)) {
                    return differenceType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 抄表类型
     */
    public enum READ_METER_TYPE {
        /**
         * 抄表类型
         */
        YES("已抄表", 0),
        NO("未抄表", 1),
        HISTORY("查历史", 2);
        public final Integer value;
        public final String valueName;


        READ_METER_TYPE(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static READ_METER_TYPE getEnumByValue(Integer value) {
            for (READ_METER_TYPE readMeterType : READ_METER_TYPE.values()) {
                if (readMeterType.value.equals(value)) {
                    return readMeterType;
                }
            }
            return null;
        }
    }

    /**
     * 抄表类型
     */
    public enum COLLECT_CHANNEL {
        /**
         * 抄表类型
         */
        FIRST("通道1", 0),
        SECOND("通道2", 1),
        THIRD("通道3", 2),
        FORTH("通道4", 3);
        public final Integer value;
        public final String valueName;


        COLLECT_CHANNEL(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (COLLECT_CHANNEL collectChannel : COLLECT_CHANNEL.values()) {
                if (collectChannel.value.equals(value)) {
                    return collectChannel.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 设备类型
     */
    public enum EquipmentType {
        /**
         * 设备类型
         */
        CELLULAR("CELLULAR", 0, "移动蜂窝网络"),
        LORAWAN("LORAWAN", 1, "LORA"),
        NBIOT("NBIOT", 2, "NB"),
        WIFI("WIFI", 3, "WIFI");
        public final Integer value;
        public final String valueName;
        public final String desc;

        EquipmentType(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static ArchivesTypeEnum getEnumByValue(Integer value) {
            for (ArchivesTypeEnum archivesTypeEnum : ArchivesTypeEnum.values()) {
                if (archivesTypeEnum.value.equals(value)) {
                    return archivesTypeEnum;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (ArchivesTypeEnum archivesTypeEnum : ArchivesTypeEnum.values()) {
                if (archivesTypeEnum.value.equals(value)) {
                    return archivesTypeEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescByValue(Integer value) {
            for (ArchivesTypeEnum archivesTypeEnum : ArchivesTypeEnum.values()) {
                if (archivesTypeEnum.value.equals(value)) {
                    return archivesTypeEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 设备NB类型
     */
    public enum EquipmentNBType {
        /**
         * 设备NB类型
         */
        MOBILE("MOBILE", 0, "NB-\u79fb\u52a8"),
        UNION("UNION", 1, "NB-\u8054\u901a/\u4e09\u7f51\u901a"),
        TELECOM("TELECOM", 2, "NB-\u7535\u4fe1");
        //        MOBILE1("MOBILE1", 3, "NB-\u79fb\u52a8-\u52a8\u6001"),
//        NBZL("NBZL", 4, "NB-\u76f4\u8fde");
        public final Integer value;
        public final String valueName;
        public final String desc;

        EquipmentNBType(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static EquipmentNBType getEnumByValue(Integer value) {
            for (EquipmentNBType equipmentNBType : EquipmentNBType.values()) {
                if (equipmentNBType.value.equals(value)) {
                    return equipmentNBType;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipmentNBType equipmentNBType : EquipmentNBType.values()) {
                if (equipmentNBType.value.equals(value)) {
                    return equipmentNBType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 设备LORA类型
     */
    public enum EquipmentLORAType {
        /**
         * 设备LORA类型
         */
        RHF("RHF", 0, "TJIOT-V1");
        public final Integer value;
        public final String valueName;
        public final String desc;

        EquipmentLORAType(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static EquipmentLORAType getEnumByValue(Integer value) {
            for (EquipmentLORAType equipmentLORAType : EquipmentLORAType.values()) {
                if (equipmentLORAType.value.equals(value)) {
                    return equipmentLORAType;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipmentLORAType equipmentLORAType : EquipmentLORAType.values()) {
                if (equipmentLORAType.value.equals(value)) {
                    return equipmentLORAType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 通信协议
     */
    public enum EquipmentAgreeEnum {
        /**
         * 通信协议
         */
        AGREE1("AGREE1", 0, "GENERAL/CRC32/HEX"),
        AGREE2("AGREE2", 1, "NB/IOT/HEX"),
        AGREE3("AGREE3", 2, "RTU/CJ/T 188-2004"),
        AGREE4("AGREE4", 3, "LORA/GUODONG/HEX"),
        AGREE5("AGREE5", 4, "LORA/TJRX/HEX"),
        AGREE6("AGREE6", 5, "LORA/7B/CJ188");

        public final Integer value;
        public final String valueName;
        public final String desc;

        EquipmentAgreeEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static EquipmentAgreeEnum getEnumByValue(Integer value) {
            for (EquipmentAgreeEnum equipmentAgreeEnum : EquipmentAgreeEnum.values()) {
                if (equipmentAgreeEnum.value.equals(value)) {
                    return equipmentAgreeEnum;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipmentAgreeEnum equipmentAgreeEnum : EquipmentAgreeEnum.values()) {
                if (equipmentAgreeEnum.value.equals(value)) {
                    return equipmentAgreeEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescByValue(Integer value) {
            for (EquipmentAgreeEnum equipmentAgreeEnum : EquipmentAgreeEnum.values()) {
                if (equipmentAgreeEnum.value.equals(value)) {
                    return equipmentAgreeEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 接线方式
     */
    public enum SysconfigWiringWayEnum {
        /**
         * 接线方式
         */
        SPTL("SPTL", 0, "\u5355\u76f8\u4e24\u7ebf"),
        SPTW("SPTW", 1, "\u5355\u76f8\u4e09\u7ebf"),
        TPTW("TPTW", 2, "\u4e09\u76f8\u4e09\u7ebf"),
        TPFW("TPFW", 3, "\u4e09\u76f8\u56db\u7ebf");

        public final Integer value;
        public final String valueName;
        public final String desc;

        SysconfigWiringWayEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static SysconfigWiringWayEnum getEnumByValue(Integer value) {
            for (SysconfigWiringWayEnum sysconfigWiringWayEnum : SysconfigWiringWayEnum.values()) {
                if (sysconfigWiringWayEnum.value.equals(value)) {
                    return sysconfigWiringWayEnum;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (SysconfigWiringWayEnum sysconfigWiringWayEnum : SysconfigWiringWayEnum.values()) {
                if (sysconfigWiringWayEnum.value.equals(value)) {
                    return sysconfigWiringWayEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescByValue(Integer value) {
            for (SysconfigWiringWayEnum sysconfigWiringWayEnum : SysconfigWiringWayEnum.values()) {
                if (sysconfigWiringWayEnum.value.equals(value)) {
                    return sysconfigWiringWayEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 口径
     */
    public enum SysconfigCalEnum {
        /**
         * 口径
         */
        DN15("DN15", 0, "DN15"),
        DN20("DN20", 1, "DN20"),
        DN25("DN25", 2, "DN25"),
        DN40("DN40", 3, "DN40"),
        DN50("DN50", 4, "DN50"),
        DN80("DN80", 5, "DN80"),
        DN100("DN100", 6, "DN100"),
        DN150("DN150", 7, "DN150"),
        DN200("DN200", 8, "DN200");

        public final Integer value;
        public final String valueName;
        public final String desc;

        SysconfigCalEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static SysconfigCalEnum getEnumByValue(Integer value) {
            for (SysconfigCalEnum sysconfigCalEnum : SysconfigCalEnum.values()) {
                if (sysconfigCalEnum.value.equals(value)) {
                    return sysconfigCalEnum;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (SysconfigCalEnum sysconfigCalEnum : SysconfigCalEnum.values()) {
                if (sysconfigCalEnum.value.equals(value)) {
                    return sysconfigCalEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescByValue(Integer value) {
            for (SysconfigCalEnum sysconfigCalEnum : SysconfigCalEnum.values()) {
                if (sysconfigCalEnum.value.equals(value)) {
                    return sysconfigCalEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 设备类型
     */
    public enum ArchivesTypeEnum {
        /**
         * 设备类型
         */
        ELECTRIC("ELECTRIC", 0, "ELECTRIC"),
        PULSE("PULSE", 1, "PULSE"),
        DRYREED("DRYREED", 2, "DRYREED"),
        HALL("HALL", 3, "HALL"),
        ELECTRICITY("ELECTRICITY", 4, "ELECTRICITY"),
        ULTRASONIC("ULTRASONIC", 5, "ULTRASONIC"),
        ElectricValve("ElectricValve", 6, "ElectricValve"),
        LeakDetector("LeakDetector", 7, "LeakDetector");

        public final Integer value;
        public final String valueName;
        public final String desc;

        ArchivesTypeEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static EquipmentType getEnumByValue(Integer value) {
            for (EquipmentType equipmentType : EquipmentType.values()) {
                if (equipmentType.value.equals(value)) {
                    return equipmentType;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipmentType equipmentType : EquipmentType.values()) {
                if (equipmentType.value.equals(value)) {
                    return equipmentType.valueName;
                }
            }
            return null;
        }

        public static String getDescByValue(Integer value) {
            for (EquipmentType equipmentType : EquipmentType.values()) {
                if (equipmentType.value.equals(value)) {
                    return equipmentType.desc;
                }
            }
            return null;
        }
    }

    /**
     * 口径
     */
    public enum DecimalPointEnum {
        /**
         * 口径
         */
        ZERO("0位", 0),
        ONE("1位", 1),
        TWO("2位", 2),
        THREE("3位", 3);

        public final Integer value;
        public final String valueName;

        DecimalPointEnum(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static DecimalPointEnum getEnumByValue(Integer value) {
            for (DecimalPointEnum decimalPointEnum : DecimalPointEnum.values()) {
                if (decimalPointEnum.value.equals(value)) {
                    return decimalPointEnum;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (DecimalPointEnum decimalPointEnum : DecimalPointEnum.values()) {
                if (decimalPointEnum.value.equals(value)) {
                    return decimalPointEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 口径
     */
    public enum SettlementDay {
        /**
         * 口径
         */
        ONE(1),
        TWO(2),
        THREE(3),
        FOUR(4),
        FIVE(5),
        SIX(6),
        SEVEN(7),
        EIGHT(8),
        NINE(9),
        TEN(10),
        ELEVEN(11),
        TWELVE(12),
        THIRTEEN(12),
        FOURTEEN(14),
        FIFTEEN(15),
        SIXTEEN(16),
        SEVENTEEN(17),
        EIGHTEEN(18),
        NINETEEN(19),
        TWENTY(20),
        TWENTY_ONE(21),
        TWENTY_TWO(22),
        TWENTY_THREE(23),
        TWENTY_FOUR(24),
        TWENTY_FIVE(25),
        TWENTY_SIX(26),
        TWENTY_SEVEN(27),
        TWENTY_EIGHT(28);

        public final Integer value;

        SettlementDay(final Integer value) {
            this.value = value;
        }
    }

    /**
     * 客户状态
     */
    public enum AreaCustomerStateEnum {
        NOA("NOA", 0, "关闭"),
        HOA("HOA", 1, "打开"),
        ITT("ITT", 2, "转移"),
        AP("AP", 3, "出售");
        public final Integer value;
        public final String valueName;
        public final String description;

        AreaCustomerStateEnum(final String valueName, final Integer value,final String description) {
            this.value = value;
            this.valueName = valueName;
            this.description = description;
        }


        public static String getValueNameByValue(Integer value) {
            for (AreaCustomerStateEnum areaCustomerStateEnum : AreaCustomerStateEnum.values()) {
                if (areaCustomerStateEnum.value.equals(value)) {
                    return areaCustomerStateEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 状态
     */
    public enum ConnectStateEnum {
        /**
         * 口径
         */
        ABNORMAL("不正常", 0),
        NORMAL("正常", 1);

        public final Integer value;
        public final String valueName;

        ConnectStateEnum(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 批量关 开阀
     */
    public enum OperateValveStateEnum {
        /**
         * 口径
         */
        CLOSE("关阀", "0"),
        OPEN("开阀", "1");

        public final String value;
        public final String valueName;

        OperateValveStateEnum(final String valueName, final String value) {
            this.value = value;
            this.valueName = valueName;
        }
    }

    /**
     * 指令类型
     */
    public enum EquipmentInstructionType {
        /**
         * 指令类型
         */
        READ("READ", 0, "read"),
        WRITE("WRITE", 1, "write");
        public final Integer value;
        public final String valueName;
        public final String desc;

        EquipmentInstructionType(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static EquipmentInstructionType getEnumByValue(Integer value) {
            for (EquipmentInstructionType instructionType : EquipmentInstructionType.values()) {
                if (instructionType.value.equals(value)) {
                    return instructionType;
                }
            }
            return null;
        }

        public static String getValueNameByValue(Integer value) {
            for (EquipmentInstructionType instructionType : EquipmentInstructionType.values()) {
                if (instructionType.value.equals(value)) {
                    return instructionType.valueName;
                }
            }
            return null;
        }

        public static String getDescByValue(Integer value) {
            for (EquipmentInstructionType instructionType : EquipmentInstructionType.values()) {
                if (instructionType.value.equals(value)) {
                    return instructionType.desc;
                }
            }
            return null;
        }
    }

    /**
     * 启用状态
     */
    public enum EnabledState {
        /**
         * 启用状态
         */
        VOID("作废", 0),
        ENABLED("启用", 1);
        public final Integer value;
        public final String valueName;


        EnabledState(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (EnabledState enabledState : EnabledState.values()) {
                if (enabledState.value.equals(value)) {
                    return enabledState.valueName;
                }
            }
            return null;
        }
    }
    /**
     * 指令类型
     */
    public enum InstructionTypeEnum {
        /**
         * 指令类型
         */
        DATA_CHANGE(1, "数据变化"),
        DEVICE_EVENT(2, "设备事件"),
        DEVICE_RESPONSE(3, "设备响应"),
        DEVICE_ON_OFF_LINE(4, "设备上下线");
        public final Integer value;
        public final String valueName;

        InstructionTypeEnum(final Integer value, final String valueName) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValueNameByValue(Integer value) {
            for (InstructionTypeEnum instructionTypeEnum : InstructionTypeEnum.values()) {
                if (instructionTypeEnum.value.equals(value)) {
                    return instructionTypeEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 户号过滤枚举
     */
    public enum HouseholdFilter {
        /**
         * 户号过滤枚举
         */
        ALL("全部", 0),
        HOURSE_NAME("户名", 1),
        HOURSE_NUMBER("户号", 2),
        ENABLED("手机号", 3);
        public final Integer value;
        public final String valueName;


        HouseholdFilter(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (HouseholdFilter householdFilter : HouseholdFilter.values()) {
                if (householdFilter.value.equals(value)) {
                    return householdFilter.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 档案过滤枚举
     */
    public enum ArchivesFilter {
        /**
         * 档案过滤枚举
         */
        ALL("all", 0, "全部"),
        CUSTOMER_NAME("customerName", 1, "客户名称"),
        CUSTOMER_SERIALNUMBER("customerSerialnumber", 2, "客户编号"),
        SERIALNUMBER("serialnumber", 3, "表计地址"),
        NBONET_NET_IMEI("nbonetNetImei", 4, "IMEI"),
        NBONE_NET_DEVICE_ID("nboneNetDeviceId", 5, "DEVICEID"),
        LORAWAN_DEVEUI("lorawanDeveui", 6, "DEVEUI");
        public final Integer value;
        public final String valueName;
        public final String desc;

        ArchivesFilter(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (ArchivesFilter archivesFilter : ArchivesFilter.values()) {
                if (archivesFilter.value.equals(value)) {
                    return archivesFilter.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (ArchivesFilter archivesFilter : ArchivesFilter.values()) {
                if (archivesFilter.value.equals(value)) {
                    return archivesFilter.desc;
                }
            }
            return null;
        }

    }

    /**
     * 客户类型(档案管理专用)
     */
    public enum ArchivesCustomerTypeEnum {
        /**
         * 客户类型(档案管理专用)
         */
        RESIDENTS("RESIDENTS", 0, "居民"),
        BUSINESS("BUSINESS", 1, "商业"),
        INDUSTRIAL("INDUSTRIAL", 2, "工业"),
        AGRICULTURAL("AGRICULTURAL", 3, "农业"),
        EDUCATION("EDUCATION", 4, "教育"),
        MEDICAL("MEDICAL", 5, "医疗"),
        GOANDINS("GOANDINS", 6, "政府及事业单位"),
        OTHER("OTHER", 7, "其他");
        public final Integer value;
        public final String valueName;
        public final String desc;

        ArchivesCustomerTypeEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValueNameByValue(Integer value) {
            for (ArchivesCustomerTypeEnum customerTypeEnum : ArchivesCustomerTypeEnum.values()) {
                if (customerTypeEnum.value.equals(value)) {
                    return customerTypeEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (ArchivesCustomerTypeEnum archivesCustomerTypeEnum : ArchivesCustomerTypeEnum.values()) {
                if (archivesCustomerTypeEnum.value.equals(value)) {
                    return archivesCustomerTypeEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 客户状态（档案管理专用）
     */
    public enum ArchivesCustomerStateEnum {
        /**
         * 客户状态（档案管理专用）
         */
        NOA("NOA", 0, "未开户"),
        HOA("HOA", 1, "已开户"),
        ITT("ITT", 2, "已过户"),
        AP("AP", 3, "已销户");
        public final Integer value;
        public final String valueName;
        public final String desc;

        ArchivesCustomerStateEnum(final String valueName, final Integer value,final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }


        public static String getValueNameByValue(Integer value) {
            for (ArchivesCustomerStateEnum areaCustomerStateEnum : ArchivesCustomerStateEnum.values()) {
                if (areaCustomerStateEnum.value.equals(value)) {
                    return areaCustomerStateEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (ArchivesCustomerStateEnum archivesCustomerStateEnum : ArchivesCustomerStateEnum.values()) {
                if (archivesCustomerStateEnum.value.equals(value)) {
                    return archivesCustomerStateEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 客户状态（档案管理专用）
     */
    public enum ValveStateEnum {
        /**
         * 客户状态（档案管理专用）
         */
        UNKNOW("UNKNOW", 0, "未知"),
        OPENED("OPENED", 1, "开启"),
        CLOSED("CLOSED", 2, "关闭");
        public final Integer value;
        public final String valueName;
        public final String desc;

        ValveStateEnum(final String valueName, final Integer value,final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }


        public static String getValueNameByValue(Integer value) {
            for (ValveStateEnum valveStateEnum : ValveStateEnum.values()) {
                if (valveStateEnum.value.equals(value)) {
                    return valveStateEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (ValveStateEnum valveStateEnum : ValveStateEnum.values()) {
                if (valveStateEnum.value.equals(value)) {
                    return valveStateEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 证件类型
     */
    public enum CustomerCertificateType {
        /**
         * 证件类型
         */
        ID_CARD("身份证", 0),
        ACCOUNT_BOOK("户口本", 1),
        RESIDENCE_PERMIT("居住证", 2);
        public final Integer value;
        public final String valueName;


        CustomerCertificateType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (CustomerCertificateType customerCertificateType : CustomerCertificateType.values()) {
                if (customerCertificateType.value.equals(value)) {
                    return customerCertificateType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 计算方法
     */
    public enum PayModEnum {
        /**
         * 计算方法
         */
        POST_PAYMENT("后付款", 0),
        PREPAYMENTS("预付款", 1);
        public final Integer value;
        public final String valueName;


        PayModEnum(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (PayModEnum paymodEnum : PayModEnum.values()) {
                if (paymodEnum.value.equals(value)) {
                    return paymodEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 采集器通道
     */
    public enum CollectChannel {
        /**
         * 采集器通道
         */
        CHANNEL1("CHANNEL1", 0, "CHANNEL1"),
        CHANNEL2("CHANNEL2", 1, "CHANNEL2"),
        CHANNEL3("CHANNEL3", 2, "CHANNEL3"),
        CHANNEL4("CHANNEL4", 3, "CHANNEL4");
        public final Integer value;
        public final String valueName;
        public final String desc;


        CollectChannel(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (CollectChannel collectChannel : CollectChannel.values()) {
                if (collectChannel.value.equals(value)) {
                    return collectChannel.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (CollectChannel collectChannel : CollectChannel.values()) {
                if (collectChannel.value.equals(value)) {
                    return collectChannel.desc;
                }
            }
            return null;
        }
    }

    /**
     * 计费类型
     */
    public enum MeasureBillingType {
        /**
         * 计费类型
         */
        POST_PAYMENT("后付费", 0),
        PREPAYMENTS("预付费", 1);
        public final Integer value;
        public final String valueName;


        MeasureBillingType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (MeasureBillingType measureBillingType : MeasureBillingType.values()) {
                if (measureBillingType.value.equals(value)) {
                    return measureBillingType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 控制方式
     */
    public enum MeasureControlType {
        /**
         * 控制方式
         */
        POST_PAYMENT("远程费控", 0),
        PREPAYMENTS("本地费控", 1);
        public final Integer value;
        public final String valueName;


        MeasureControlType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (MeasureControlType measureControlType : MeasureControlType.values()) {
                if (measureControlType.value.equals(value)) {
                    return measureControlType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 运行状态
     */
    public enum RunStateEnum {
        /**
         * 运行状态
         */
        NORMAL("NORMAL", 0, "NORMAL"),
        UPDATE("UPDATE", 1, "UPDATE"),
        DEMOLITION("DEMOLITION", 2, "DEMOLITION"),
        STOP("STOP", 3, "STOP"),
        CHANGE("CHANGE", 4, "CHANGE");
        public final Integer value;
        public final String valueName;
        public final String desc;


        RunStateEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (RunStateEnum runStateEnum : RunStateEnum.values()) {
                if (runStateEnum.value.equals(value)) {
                    return runStateEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (RunStateEnum runStateEnum : RunStateEnum.values()) {
                if (runStateEnum.value.equals(value)) {
                    return runStateEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * NB类型
     */
    public enum MeterType {
        /**
         * NB类型
         */
        CODE_WATER("CODE_WATER", 0, "水表"),
        CODE_GAS("CODE_GAS", 1, "气表"),
        CODE_ELEC("CODE_ELEC", 2, "电表");
        public final Integer value;
        public final String valueName;
        public final String desc;


        MeterType(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (MeterType meterType : MeterType.values()) {
                if (meterType.value.equals(value)) {
                    return meterType.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (MeterType meterType : MeterType.values()) {
                if (meterType.value.equals(value)) {
                    return meterType.desc;
                }
            }
            return null;
        }
    }

    /**
     * 是 否
     */
    public enum BooleanIntEnum {
        /**
         * 是 否
         */
        FALSE("否", 0),
        TRUE("是", 1);
        public final Integer value;
        public final String valueName;


        BooleanIntEnum(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (BooleanIntEnum booleanIntEnum : BooleanIntEnum.values()) {
                if (booleanIntEnum.value.equals(value)) {
                    return booleanIntEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 上行通道
     */
    public enum EquipmentUpsideEnum {
        /**
         * 上行通道
         */
        CHANNEL1("CHANNEL1", 0, "Ethernet"),
        CHANNEL2("CHANNEL2", 1, "Optical-Fiber"),
        CHANNEL3("CHANNEL3", 2, "GPRS"),
        CHANNEL4("CHANNEL4", 3, "CDMA"),
        CHANNEL5("CHANNEL5", 4, "2G"),
        CHANNEL6("CHANNEL6", 5, "3G"),
        CHANNEL7("CHANNEL7", 6, "4G");
        public final Integer value;
        public final String valueName;
        public final String desc;


        EquipmentUpsideEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (EquipmentUpsideEnum equipmentUpsideEnum : EquipmentUpsideEnum.values()) {
                if (equipmentUpsideEnum.value.equals(value)) {
                    return equipmentUpsideEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (EquipmentUpsideEnum equipmentUpsideEnum : EquipmentUpsideEnum.values()) {
                if (equipmentUpsideEnum.value.equals(value)) {
                    return equipmentUpsideEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 下行通道
     */
    public enum EquipmentDownEnum {
        /**
         * 下行通道
         */
        CHANNEL1("CHANNEL1", 0, "PLC"),
        CHANNEL2("CHANNEL2", 1, "RS-485"),
        CHANNEL3("CHANNEL3", 2, "M-BUS"),
        CHANNEL4("CHANNEL4", 3, "RF");
        public final Integer value;
        public final String valueName;
        public final String desc;


        EquipmentDownEnum(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (EquipmentDownEnum equipmentDownEnum : EquipmentDownEnum.values()) {
                if (equipmentDownEnum.value.equals(value)) {
                    return equipmentDownEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (EquipmentDownEnum equipmentDownEnum : EquipmentDownEnum.values()) {
                if (equipmentDownEnum.value.equals(value)) {
                    return equipmentDownEnum.desc;
                }
            }
            return null;
        }
    }

    /**
     * 连接类型
     */
    public enum EquipmentConnectType {
        /**
         * 连接类型
         */
        TCP("TCP", 0, "TCP"),
        UDP("UDP", 1, "UDP");
        public final Integer value;
        public final String valueName;
        public final String desc;


        EquipmentConnectType(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (EquipmentConnectType equipmentDownEnum : EquipmentConnectType.values()) {
                if (equipmentDownEnum.value.equals(value)) {
                    return equipmentDownEnum.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (EquipmentConnectType equipmentConnectType : EquipmentConnectType.values()) {
                if (equipmentConnectType.value.equals(value)) {
                    return equipmentConnectType.desc;
                }
            }
            return null;
        }
    }

    /**
     * 定时任务枚举
     */
    public enum SysconfigTaskFilter {
        /**
         * 定时任务枚举
         */
        ALL("全部", 0),
        NAME("任务名称", 1);
        public final Integer value;
        public final String valueName;


        SysconfigTaskFilter(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (SysconfigTaskFilter householdFilter : SysconfigTaskFilter.values()) {
                if (householdFilter.value.equals(value)) {
                    return householdFilter.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 定时任务枚举
     */
    public enum TreeNameEnum {
        /**
         * 定时任务枚举
         */
        ONCE("一次", 0),
        HOUR("每时", 1),
        DAY("每日", 2),
        WEEK("每周", 3),
        MONTH("每月", 4);
        public final Integer value;
        public final String valueName;

        TreeNameEnum(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (TreeNameEnum treeNameEnum : TreeNameEnum.values()) {
                if (treeNameEnum.value.equals(value)) {
                    return treeNameEnum.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 连接类型
     */
    public enum ExecutionStatus {
        /**
         * 连接类型
         */
        DOING("DOING", 0, "\u6267\u884c\u4e2d"),
        SUCCESS("SUCCESS", 1, "\u6267\u884c\u6210\u529f"),
        FAIL("FAIL", 2, "\u6267\u884c\u5931\u8d25"),
        CANCEL("CANCEL", 3, "\u5df2\u53d6\u6d88");
        public final Integer value;
        public final String valueName;
        public final String desc;


        ExecutionStatus(final String valueName, final Integer value, final String desc) {
            this.value = value;
            this.valueName = valueName;
            this.desc = desc;
        }

        public static String getValuenameByValue(Integer value) {
            for (ExecutionStatus executionStatus : ExecutionStatus.values()) {
                if (executionStatus.value.equals(value)) {
                    return executionStatus.valueName;
                }
            }
            return null;
        }

        public static String getDescNameByValue(Integer value) {
            for (ExecutionStatus executionStatus : ExecutionStatus.values()) {
                if (executionStatus.value.equals(value)) {
                    return executionStatus.desc;
                }
            }
            return null;
        }
    }

    /**
     * 定时任务枚举
     */
    public enum ChType {
        /**
         * 定时任务枚举
         */
        REMOVE("拆表", 0),
        CHANGE("换表", 1);
        public final Integer value;
        public final String valueName;

        ChType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (ChType chType : ChType.values()) {
                if (chType.value.equals(value)) {
                    return chType.valueName;
                }
            }
            return null;
        }
    }

    /**
     * 启用状态
     */
    public enum LadderType {
        /**
         * 启用状态
         */
        FLAT("固定单价", 0),
        LADDER("阶梯价", 1);
        public final Integer value;
        public final String valueName;


        LadderType(final String valueName, final Integer value) {
            this.value = value;
            this.valueName = valueName;
        }

        public static String getValuenameByValue(Integer value) {
            for (LadderType ladderType : LadderType.values()) {
                if (ladderType.value.equals(value)) {
                    return ladderType.valueName;
                }
            }
            return null;
        }
    }
}